<div class="layuimini-container">
    <form id="app-form" class="layui-form layuimini-form">
        <div class="layui-form-item">
            <label class="layui-form-label">服务项目</label>
            <div class="layui-input-block">
                <input type="text" id="demo1" class="layui-input" readonly="readonly" name="cate_id">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label" style="color: red;">Tips</label>
            <div class="layui-input-block" style="color: red;">
                1.只有关联平台分类才可以在平台分类展示
            </div>
        </div>
        <div class="hr-line"></div>
        <div class="layui-form-item text-center">
            <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit>确认</button>
            <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">重置</button>
        </div>

    </form>
</div>
<link rel="stylesheet" type="text/css" href="__STATIC__/plugs/lay_cascader/cascader/cascader.css"/>
<script src="__STATIC__/plugs/lay_cascader/cascader/cascader.js"></script>
<script type="text/javascript"> 

    var form = layui.form,
            upload = layui.upload,
            $ = layui.jquery;
            var table = layui.table,
                table2 = layui.table;
            var dataTypes = null;
        var server_type="{$server_type}";
          $.ajax({
                url: "/admin/platform.category/getCate?server_type="+server_type,
                type: 'get',
                contentType: "application/x-www-form-urlencoded; charset=UTF-8",
                dataType: "json",
                timeout: 60000,
                success: function (res) {
           
                    layui.use('layCascader', function () {
                        var layCascader = layui.layCascader;
                        layCascader({
                        elem: '#demo1',
                        clearable:true,
                        props:{
                            multiple: true,
                        },
                        value:"{$row['cate_id']}",
                        options: res.data,
                        // event:store(),
                        
                        });
                    });
                    
                },
                error: function (xhr, textstatus, thrown) {
                  
                    return false;
                }
        });
    </script>